package com.wuyou.controller;

import com.wuyou.pojo.PageBean;
import com.wuyou.pojo.ReQuery;
import com.wuyou.pojo.Report;
import com.wuyou.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 闵洪友
 * @create 2020-09-02 11:10
 */
@RestController
@RequestMapping("/rePage")
public class ReportController {
    @Autowired
    @Resource
    private ReportService reportService;

    @RequestMapping("findAllReport")
    public List<Report> findAll(@RequestParam String pg, @RequestBody ReQuery reQuery){
        PageBean pageBean=new PageBean();
        List<Report> reportList=reportService.findAll(pageBean,pg,reQuery);
        return reportList;
    }
}
